﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.Administration;

namespace Elkitools.EditorParts.ListSelector.Tools
{
    /// <summary>
    /// This class is used internaly to log informations in the uls
    /// </summary>
    internal class UlsLogger
    {
        internal static void Error(string pstrMessage)
        {
            SPDiagnosticsService.Local.WriteTrace(
                UlsConstants.TRACE_ID,
                UlsConstants.ERROR_TRACE_CATEGORY,
                TraceSeverity.Unexpected,
                pstrMessage);
        }

        internal static void Debug(string pstrMessage, params object[] data)
        {
            SPDiagnosticsService.Local.WriteTrace(
                UlsConstants.TRACE_ID,
                UlsConstants.DEBUG_TRACE_CATEGORY,
                TraceSeverity.Verbose,
                pstrMessage,
                data);

            System.Diagnostics.Debug.WriteLine(pstrMessage);
        }
    }
}
